//
//  WKRootViewController.m
//  ourToken
//
//  Created by wakeup on 2018/5/29.
//  Copyright © 2018年 ourtoken. All rights reserved.
//

#import "WKRootViewController.h"
#import "WKBaseHeader.h"

@interface WKRootViewController ()

@end

@implementation WKRootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //隐藏导航栏第三方
    self.fd_prefersNavigationBarHidden = YES;
    self.fd_interactivePopDisabled = YES;
    
    WKWalletViewController *wallet = [[WKWalletViewController alloc] init];
//    WKTransactionViewController *transaction = [[WKTransactionViewController alloc] init];
    WKMineViewController *mine = [[WKMineViewController alloc] init];
    self.viewControllers = @[wallet,mine];
    
    //设置控制器的Title
    wallet.title = @"钱包";
//    transaction.title = @"交易";
    mine.title = @"我的";
    
    //拿到TabBar再拿到相应的item
    UITabBar *tabBar = self.tabBar;
    UITabBarItem *item0 = [tabBar.items objectAtIndex:0];
//    UITabBarItem *item1 = [tabBar.items objectAtIndex:1];
    UITabBarItem *item2 = [tabBar.items objectAtIndex:1];
    
    //设置选中时的颜色
    [[UITabBarItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:AppManager.themeColor} forState:UIControlStateSelected];
    
    //对item设置相应地图片
    item0.selectedImage = [[UIImage imageNamed:@"qianbaoq"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    item0.image = [[UIImage imageNamed:@"qianbaohui"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    
//    item1.selectedImage = [[UIImage imageNamed:@"jiaoyiq"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
//    item1.image = [[UIImage imageNamed:@"jiaoyihui"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    
    item2.selectedImage = [[UIImage imageNamed:@"wodeq"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    item2.image = [[UIImage imageNamed:@"wodehui"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
}



@end
